# This is a sample Python script.
import encodings


# Press Shift+F10 to execute it or replace it with your code.
# Press Double Shift to search everywhere for classes, files, tool windows, actions, and settings.


def print_hi(name):
    # Use a breakpoint in the code line below to debug your script.
    print(f'Hi, {name}')  # Press Ctrl+F8 to toggle the breakpoint.


class MyTestStr:
    name = ""
    age = 0
    address = ""

    # 定义构造方法
    def __init__(self, name, age, address):
        self.name = name
        self.age = age
        self.address = address

    def __str__(self):
        return "name: %s, age: %d, address: %s" % (self.name, self.age, self.address)

    def speak(self):
        print("%s 说： 我 %d 岁。" % (self.name, self.age))


# Press the green button in the gutter to run the script.
if __name__ == '__main__':
    # p = MyTestStr('ztc', 18, '天天超市')
    # print("我是一个类:" + str(p))
    # p.speak()

    a = "我"
    str_bytes = bytes(a, encoding='utf-8')
    binary_representation = [bin(byte) for byte in str_bytes]
    print(binary_representation)

    demo_dict = {'name': 'ztc', 'age': 18, "Ledaddress": "天天超市"}
    print("address" in demo_dict)

# See PyCharm help at https://www.jetbrains.com/help/pycharm/
